import json

import config


class ReadJsonUtil:
    #封装一个读取json文件的方法, [("admin”,"HM_",200,"操作成功“，200),(),()]
    @classmethod
    def read_config(cls,file_path):
        with open(file_path,"r",encoding="utf-8") as f:
            data = json.load(f)
            #先定义list1
            list1=[]
            #遍历data
            for item  in data:
                temp=tuple(item.values())
                list1.append(temp)
            return list1
if __name__ == '__main__':
    login_file=config.base_dir+"/data/login.json"
    print(ReadJsonUtil.read_config(login_file))